Skip to content

Conversation

@innocenzi
Copy link
Member

Closes #1286

This now works:

$users = query(User::class)
  ->select()
  ->all();

$serialized = map($users)
  ->collection()
  ->toArray();

// [
//   ['full_name' => 'Jon Doe'],
//   ['full_name' => 'Jane Doe'],
// ]

@brendt brendt merged commit accab81 into 2.x Aug 18, 2025
77 checks passed
@brendt brendt deleted the feat/mapper-collection-to-array branch August 18, 2025 12:57
Bapawe pushed a commit to Bapawe/tempest-framework that referenced this pull request Aug 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support map(...)->toJson() with collections

3 participants